Small fix for shadow mode: fix a p.t. limit check.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 29 Nov 2005 10:42:21 +0000 (11:42 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 29 Nov 2005 10:42:21 +0000 (11:42 +0100)
Signed-off-by:Xiaofeng Ling <xiaofeng.ling@intel.com>

xen/arch/x86/shadow.c
xen/arch/x86/shadow32.c

index 3009c6f9b00271f841614b563d86c013bfd85ab2..8819071b04460e8d186c2c4b3d9146a9bc475a68 100644 (file)
@@ -1333,7 +1333,7 @@ static u32 remove_all_write_access_in_ptpage(
         i = (frame_table[readonly_gmfn].u.inuse.type_info & PGT_va_mask)
             >> PGT_va_shift;
 
-        if ( (i >= 0 && i <= L1_PAGETABLE_ENTRIES) &&
+        if ( (i >= 0 && i < L1_PAGETABLE_ENTRIES) &&
              !l1e_has_changed(pt[i], match, flags) &&
              fix_entry(d, &pt[i], &found, is_l1_shadow, max_refs_to_find) &&
              !prediction )
index d6591f586a880569526bfeb58a5d9a3dfa908d3a..b733c2586ce66c8566d1dea100d6776f948a0615 100644 (file)
@@ -2146,7 +2146,7 @@ static u32 remove_all_write_access_in_ptpage(
         i = (frame_table[readonly_gmfn].u.inuse.type_info & PGT_va_mask) 
             >> PGT_va_shift;
 
-        if ( (i >= 0 && i <= L1_PAGETABLE_ENTRIES) &&
+        if ( (i >= 0 && i < L1_PAGETABLE_ENTRIES) &&
              !l1e_has_changed(pt[i], match, flags) && 
              fix_entry(d, &pt[i], &found, is_l1_shadow, max_refs_to_find) &&
              !prediction )